package com.yzf.demo.demo.ReflectionMechanism;

import java.lang.reflect.Method;

/**
 * Created by 于占峰 on 2020/3/24/024.
 */
public class GetMethod {
    public static void main(String[] args) throws NoSuchMethodException {
        Class clazz = DemoBean.class;
        Method method = clazz.getMethod("demoMethod");
        Method[] methods = clazz.getMethods();
        System.out.println(method);
        System.out.println(methods);
    }
}
